/*
<license>
Copyright (c) 2008, Chris Venter <chris.venter@gmail.com>
All rights reserved.

This file is part of quicktag <http://code.google.com/p/quicktag/>

quicktag is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

quicktag is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this code.
If not, see <http://www.gnu.org/licenses/>.
</license>
*/
#include <generik/tracing.h>
GENERIK_TRACER_GLOBAL;

#include <quicktag/quicktag.h>
#include <iostream>

int main(int argc, char** argv)
{
	std::string filename;
	if (argc > 1)
	{
		filename = argv[1];
	}
	else
	{
		std::cout<<"Please specify a media file as argument"<<std::endl;
	}
	
	quicktag::tags tags;
	int result = quicktag::read_file(filename, tags);
	if (result == READVAL_OK)
	{
		std::cout<<"tracknr : "<<tags.tracknr<<std::endl;
		std::cout<<"title   : "<<tags.title<<std::endl;
		std::cout<<"artist  : "<<tags.artist<<std::endl;
		std::cout<<"album   : "<<tags.album<<std::endl;
		std::cout<<"genre   : "<<tags.genre<<std::endl;
	}
	else
	{
		std::cout<<"could not process "<<filename<<std::endl;
	}
	
	return 0;
}
